<html>
<head>
    <title>库存商品列表</title>
    <link rel="stylesheet" type="text/css" href="/media/css/basic.css"/>
    <link rel="stylesheet" type="text/css" href="/media/css/foot.css"/>
    <link rel="stylesheet" type="text/css" href="/media/warehouse/css/commodity_list.css"/>
    <link rel="stylesheet" type="text/css" href="/media/warehouse/css/jquery-ui-1.8.21.custom.css" />
    <script src="/media/jquery/js/jquery.min.js"></script>
    <script src="/media/jquery/js/jquery-ui.min.js"></script>
    <script type="text/javascript" language="javascript" src="/media/warehouse/js/list.js" ></script>
</head>
<body>

<div id="editDialog" title="编辑商品" style="display: none">
    <form id="editForm" action="/warehouse/commodity/edit/" method="post" style="width: 290px; height: 230px;">
        <input type="hidden" value="" id="id_edit_commodity_id" name="edit_commodity_id" />
        <table style="border: none;">
            <tr>
                <td>商品ID:</td>
                <td>
                    <input type="text" value="" id="commodity_id" name="commodity_id" style="width:180px"/>
                </td>
            </tr>

            <tr>
                <td>商品名称:</td>
                <td>
                    <input type="text" maxlength="16" value="" id="id_edit_commodity_name" name="edit_commodity_name" style="width: 180px"/>
                </td>
            </tr>

            <tr>
                <td>库存:</td>
                <td>
                    <input type="text" maxlength="16" value="" id="id_edit_commodity_stock" name="edit_commodity_stock" style="width: 180px" />
                </td>
            </tr>

            <tr>
                <td>单价:</td>
                <td>
                    <input type="text" maxlength="16" value="" id="id_edit_commodity_price" name="edit_commodity_price" style="width: 180px"/>
                </td>
            </tr>

            <tr>
                <td>商品类别:</td>
                <td>
                    <input type="text" maxlength="16" value="" id="id_edit_commodity_catagory" name="edit_commodity_catagory" style="width:180px"/>
                </td>
            </tr>

            <tr>
                <td>描述：</td>
                <td>
                    <input type="text" maxlength="100" value="" id="id_edit_commodity_desc" name="edit_commodity_desc" style="width: 180px" />
                </td>
            </tr>

            <tr>
                <td>
                    <input style="width: 80px" onclick="javascript:checkEditValue(event);" type="submit" value="确定" />
                </td>
            </tr>
        </table>
    </form>
</div>


<span title="ssss"></span>
    <div id="wrap" class="div_body">
        <div id="div_div" align="center">
            <p>库存中总共有&nbsp;{{ commodity_count }}&nbsp;件&nbsp;{{ commodity_catagory | default:"" }}&nbsp;商品</p>
            <div class="commoditylist" name="commoditylist" id="commoditylist">
                <table>
                    {% for item in commodity_list %}
                        <tr >
                            <div class="div_tr" style="height: 120px; width: 80%; float: left;">
                                <img src="/media/img/logo2.png" class="div_img" height="100%" width="100px">
                                <div class="div_cha" style="float: right;">
                                    <p>名称: &nbsp;{{ item.name }}&nbsp;</p>
                                    <p>类别:&nbsp;{{ item.catagory }}&nbsp;</p>
                                    <p>描述:&nbsp;{{ item.description }}</p>
                                    <p>单价:&nbsp;{{ item.price }}&nbsp; 库存:&nbsp;{{ item.stock }}&nbsp;</p>
                                    <span onclick="javascript:editOne(event, '{{ item.id | default:'' }}', '{{ item.name | default:'' }}', '{{ item.stock | default:''}}', '{{ item.price | default:'' }}', '{{ item.catagory | default:'' }}','{{ item.description | default:'' }}');" title="edit" item="{{ item.id }}" >Edit</span>
                                    <span onclick="javascrript:deleteOne(event);" title="delete" item="{{ item.id }}">Delete</span>
                                </div>
                            </div>
                        </tr>
                    {% endfor %}
                </table>
            </div>
        </div>
    </div>
    {% include 'foot.html' %}
</body>
</html>